<template>
  <div class="table-case">
    <my-table>
      <template v-slot:head>
          <th>编号</th>
          <th>图片</th>
          <th>名称</th>
          <th width="100px">标签</th>
      </template>

      <template #main="{item}">
          <td>{{item.id}}</td>
          <td><img :src="item.picture" /></td>
          <td>{{item.name}}</td> 
          <td>
              <my-tag v-model="item.tag"></my-tag>
          </td> 
      </template>
    </my-table>
  </div>
</template>

<script>
import MyTable from './components/MyTable.vue'
import MyTag from './components/MyTag.vue'
export default {
  name: 'TableCase',
  components:{
    MyTable,
    MyTag
  }
}
</script>

<style lang="less" scoped>
.table-case {
  width: 1000px;
  margin: 50px auto;
  img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    vertical-align: middle;
  }
}




</style>